Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Test Definition for location Retrieval #119

Closed
wants to merge 8 commits into from
Closed

Conversation

bigludo7
Copy link
Collaborator

In order to prepare a release candidate added Test Definition for location Retrieval

What type of PR is this?

  • tests

What this PR does / why we need it:

In order to prepare a release candidate added Test Definition for location Retrieval

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

To be done consistently with camaraproject/Commonalities#94

Changelog input

 release-note

Additional documentation

This section can be blank.

docs

In order to prepare a release candidate added Test Definition for location Retrieval
Copy link
Collaborator Author

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdomale
Copy link
Contributor

mdomale commented Jan 17, 2024

@bigludo7 Once above comments are addressed then the feature file LGTM @akoshunyadi

And the response body should contain an error message indicating an invalid argument


@location_retrieval_04_Missing_MaxAge
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maxAge is not mandatory in rc2: https://github.com/camaraproject/DeviceLocation/blob/main/code/API_definitions/location-retrieval.yaml
The test should not fail with a 400 error, just continue irrespective of age of known location.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - Will fix.

| phoneNumber | +34666111333 |
| networkAccessIdentifier | 123456789@domain.com |
| ipv6Address | 2001:db8:85a3:8d3:1319:8a2e:370:7344 |

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have testcases for when a location cannot be returned ? This can happen in two ways:

  • The network does not have a location record for the device at all, e.g. it was trurned off a while ago.
  • There is a location information in the network, but it does not satisfy the maxAge criterion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - added Test Case

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add the fact that the location is known by the operator to the Given steps

Fixed after Cetin review + added a TC to differentiate unauthenticated from unauthorized + added error code for rainy scenario.
Copy link
Collaborator Author

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed after @alpaycetin74 review + added a TC to differentiate unauthenticated from unauthorized + added error code for rainy scenario.

Copy link
Collaborator

@jlurien jlurien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more generic comments from a first review:

  • We probably need to define a set of programmable steps that can be reused between scenarios and APIs.
  • Scenarios must be implementable just with the information indicated in the scenario
  • This is difficult task. We may need to identify the scenarios that we want to test and then decide on the best way to express them.
  • I'm getting feedback from our QA team and will make another PR with a proposal as well

code/Test_definitions/LocationRetrieval.feature Outdated Show resolved Hide resolved
| phoneNumber | +34666111333 |
| networkAccessIdentifier | 123456789@domain.com |
| ipv6Address | 2001:db8:85a3:8d3:1319:8a2e:370:7344 |

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add the fact that the location is known by the operator to the Given steps

code/Test_definitions/LocationRetrieval.feature Outdated Show resolved Hide resolved
code/Test_definitions/LocationRetrieval.feature Outdated Show resolved Hide resolved
code/Test_definitions/LocationRetrieval.feature Outdated Show resolved Hide resolved
code/Test_definitions/LocationRetrieval.feature Outdated Show resolved Hide resolved
code/Test_definitions/LocationRetrieval.feature Outdated Show resolved Hide resolved
bigludo7 and others added 2 commits February 2, 2024 17:54
Copy link

github-actions bot commented Jun 4, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.03s
✅ OPENAPI spectral 3 0 4.8s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY secretlint yes no 0.8s
✅ YAML yamllint 3 0 0.66s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

Copy link
Collaborator Author

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the file accordingly to the Commonalities Test Definition Specification & the feature file provided by @jlurien for Device-Verification.
This file will be updated in future in parallel with Device-Verification.feature file.

Copy link
Collaborator Author

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned with location-verification.feature as updated by @jlurien

@bigludo7 bigludo7 added the Fall24 Meta-release Fall24 label Jul 1, 2024
Aligned with change on error code
Copy link
Collaborator Author

@bigludo7 bigludo7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aligned with change on error code
Aligned with #189 last update

@bigludo7 bigludo7 requested a review from jlurien July 2, 2024 09:48
For expired access token changed code to UNAUTHENTICATED
@bigludo7 bigludo7 closed this Jul 16, 2024
@bigludo7 bigludo7 deleted the bigludo7-patch-2 branch July 16, 2024 08:16
@bigludo7 bigludo7 restored the bigludo7-patch-2 branch July 16, 2024 08:27
@bigludo7 bigludo7 deleted the bigludo7-patch-2 branch July 16, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fall24 Meta-release Fall24
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants